#include <stdio.h>

// 定义结构体类型
struct Dog{
  char *name;
  int age;
  double weight;
};

void showDog(struct Dog *dog){
  printf("修狗资料:\n");
  printf("姓名:%s,年龄:%d,体重:%.2lf\n",
      dog->name,dog->age,dog->weight);
} 

int main(void){
  struct Dog myDog={0};
  myDog.name="旺财";
  myDog.age=1;
  myDog.weight=5.6;
  showDog(&myDog);
  printf("name:%s\n",myDog.name);
  return 0;
}